<template>
  <div class="con">
     <span class="iconfont icon-ermai">
         
     </span>
     <input type="search" v-model="val" @keyup.13="sedmessage">
     <i class="iconfont icon-biaoqing"></i>
     <i class="iconfont icon-jia1"></i>

  </div>
</template>

<script>
export default {
    data(){
        return {
            val:''
        }
    },
    methods:{
        sedmessage(){
            if(this.val.trim().length>0){
                this.$emit("sendMessage",this.val.trim())
                this.val=''
            }
        }
    }

}
</script>

<style lang="less" scoped>
div.con {
    height: 50px;
    width: 100vw;
    background-color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding:0 10px;
  span.iconfont.icon-ermai {
      font-size: 30px;
  }

  input {
      height: 30px;
      flex: 1;
      margin:0 10px;
      border: none;
      outline: none;
      background-color: #f1f1f1;
      padding-left: 5px;
      border-radius: 3px;
  }

  i.iconfont.icon-biaoqing {
      font-size: 30px;
      margin-right: 10px;

  }

  i.iconfont.icon-jia1 {
      font-size: 30px;

  }
}

</style>